Thermal management of battery modules and strings

ABSTRACT

A battery system includes: first and second positive terminals and a negative terminal; switches; at least two battery modules, each of the battery modules including at least three strings of battery cells configured to, at different times be: connected in series and to the first positive terminal via first ones of the switches; connected in parallel and to the second positive terminal via second ones of the switches; and disconnected from both of the first and second positive terminals; and a switch control module configured to: receive temperatures of the strings of battery cells, respectively; determine temperatures of the battery modules, respectively, based on the temperatures of the strings of battery cells of that battery module; and selectively actuate the switches based on at least one of: minimizing an error between the temperatures of the strings of battery cells; and minimizing an error between the temperatures of the battery modules.

INTRODUCTION

The information provided in this section is for the purpose of generallypresenting the context of the disclosure. Work of the presently namedinventors, to the extent it is described in this section, as well asaspects of the description that may not otherwise qualify as prior artat the time of filing, are neither expressly nor impliedly admitted asprior art against the present disclosure.

The present disclosure relates to vehicles and more particularly tobattery systems of vehicles.

Some types of vehicles include only an internal combustion engine thatgenerates propulsion torque. Hybrid vehicles include both an internalcombustion engine and one or more electric motors. Some types of hybridvehicles utilize the electric motor and the internal combustion enginein an effort to achieve greater fuel efficiency than if only theinternal combustion engine was used. Some types of hybrid vehiclesutilize the electric motor and the internal combustion engine to achievegreater torque output than the internal combustion could achieve byitself.

Some example types of hybrid vehicles include parallel hybrid vehicles,series hybrid vehicles, and other types of hybrid vehicles. In aparallel hybrid vehicle, the electric motor works in parallel with theengine to combine power and range advantages of the engine withefficiency and regenerative braking advantages of electric motors. In aseries hybrid vehicle, the engine drives a generator to produceelectricity for the electric motor, and the electric motor drives atransmission. This allows the electric motor to assume some of the powerresponsibilities of the engine, which may permit the use of a smallerand possibly more efficient engine. The present application isapplicable to electric vehicles, hybrid vehicles, and other types ofvehicles.

SUMMARY

In a feature, a battery system includes: a first positive terminal, asecond positive terminal, and a negative terminal; switches; at leasttwo battery modules, wherein each of the at least two battery modulesincludes at least three strings of battery cells that are configured to,at different times be: connected in series and to the first positiveterminal via first ones of the switches; connected in parallel and tothe second positive terminal via second ones of the switches; anddisconnected from both of the first and second positive terminals; and aswitch control module configured to: receive temperatures of the stringsof battery cells, respectively; determine temperatures of the batterymodules, respectively, based on the temperatures of the strings ofbattery cells of that battery module; and selectively actuate theswitches based on at least one of: minimizing an error between thetemperatures of the strings of battery cells; and minimizing an errorbetween the temperatures of the battery modules.

In further features, the switch control module is configured toselectively actuate the switches based on both of: minimizing the errorbetween the temperatures of the strings of battery cells; and minimizingthe error between the temperatures of the battery modules.

In further features, the switch control module is further configured toselectively actuate the switches based on balancing state of charges(SOCs) of strings of battery cells.

In further features, the switch control module is configured to, when afirst temperature of a first one of the strings of one of the batterymodules is less than a second temperature of a second one of the stringsof the one of the battery modules, selectively actuate the switches suchthat the first one of the strings is connected to the second positiveterminal for a longer period than the second one of the strings.

In further features, the switch control module is configured to, when afirst temperature of a first one of the strings of one of the batterymodules is greater than a second temperature of a second one of thestrings of the one of the battery modules, selectively actuate theswitches such that the first one of the strings is connected to thesecond positive terminal for a shorter period than the second one of thestrings.

In further features, the switch control module is configured to, when afirst temperature of a first one of the battery modules is less than asecond temperature of a second one of battery modules, selectivelyactuate the switches such that the strings of the first one of thebattery modules are connected in series and to the first positiveterminal for a longer period than the strings of the second one ofbattery modules.

In further features, the switch control module is configured to, when afirst temperature of a first one of the battery modules is greater thana second temperature of a second one of battery modules, selectivelyactuate the switches such that the strings of the first one of thebattery modules are connected in series and to the first positiveterminal for a shorter period than the strings of the second one ofbattery modules.

In further features, the switch control module is configured to actuatethe switches based on minimizing the error between the temperatures ofthe strings of battery cells.

In further features, the error is a squared error between thetemperatures of the strings of battery cells.

In further features, the switch control module is configured to actuatethe switches based on minimizing the error between the temperatures ofthe battery modules.

In further features, the error is a squared error between thetemperatures of the battery modules.

In further features, the switch control module is configured to actuatethe switches based on at least one of (a) a first power demand via thefirst positive terminal and (b) a second power demand via the secondpositive terminal.

In further features, each of the strings of battery cells includesmultiple battery cells connected in series.

In further features, the battery cells include four three volt batterycells.

In further features, the switch control module is configured to controlthe switches such that one of the strings of battery cells is not at thesame time connected to both the first positive terminal and the secondpositive terminal.

In further features: the first positive terminal is configured to outputa first reference potential; the second positive terminal is configuredto output a second reference potential; and the first referencepotential is greater than the second reference potential.

In further features, the first reference potential is 48 volts directcurrent (DC) and the second reference potential is 12 volts DC.

In a feature, a method for a battery includes: receiving temperatures ofstrings of battery cells, respectively, of a battery, the batteryincluding: a first positive terminal, a second positive terminal, and anegative terminal; switches; at least two battery modules, wherein eachof the at least two battery modules includes at least three strings ofbattery cells that are configured to, at different times be: connectedin series and to the first positive terminal via first ones of theswitches; connected in parallel and to the second positive terminal viasecond ones of the switches; and disconnected from both of the first andsecond positive terminals; and determining temperatures of the batterymodules, respectively, based on the temperatures of the strings ofbattery cells of that battery module; and selectively actuating theswitches based on at least one of: minimizing an error between thetemperatures of the strings of battery cells; and minimizing an errorbetween the temperatures of the battery modules.

In further features, selectively actuating the switches includesselectively actuating the switches based on both of: minimizing theerror between the temperatures of the strings of battery cells; andminimizing the error between the temperatures of the battery modules.

In further features, selectively actuating the switches includesselectively actuating the switches further based on balancing state ofcharges (SOCs) of strings of battery cells.

Further areas of applicability of the present disclosure will becomeapparent from the detailed description, the claims and the drawings. Thedetailed description and specific examples are intended for purposes ofillustration only and are not intended to limit the scope of thedisclosure.

BRIEF DESCRIPTION OF THE DRAWINGS

The present disclosure will become more fully understood from thedetailed description and the accompanying drawings, wherein:

FIG. 1 is a functional block diagram of an example engine controlsystem;

FIG. 2 is a functional block diagram an example battery system of avehicle;

FIGS. 3A-3B are a schematic including an example implementation of abattery system;

FIG. 4 is a functional block diagram of an example implementation of onebattery module in an open (X) configuration;

FIG. 5 includes an example illustration of the battery module in aseries (S) configuration;

FIG. 6 includes an example illustration of the battery module in aparallel (P) configuration;

FIG. 7 is a functional block diagram of an example switch control module

FIG. 8 includes an example time series for operation in a power modeduring charging;

FIG. 9 is a flowchart depicting an example method of balancing the SOCsof the battery strings and battery modules of a battery;

FIG. 10 includes an example table of potential power modes;

FIGS. 11-14 is an example graphs of operation over time; and

FIG. 15 is a flowchart depicting an example method of balancing SOCs andtemperatures of battery strings and modules.

In the drawings, reference numbers may be reused to identify similarand/or identical elements.

DETAILED DESCRIPTION

A battery has a first terminal on a housing of the battery foroutputting a first operating voltage (e.g., 48 V) and a second outputterminal on the housing for outputting a second operating voltage (e.g.,12 V). The battery may be a battery of a vehicle in an example. Thebattery includes a plurality of battery modules and a plurality ofswitches. Each battery module includes a plurality of battery strings,and each battery string includes a plurality of battery cells. Theswitches are configured to connect strings together in series to thefirst output terminal or individually to the second output terminal. Thestrings can also be disconnected from the first and second outputterminals.

A model predictive control (MPC) module or another type of balancingcontrol module uses estimates or measurements of SOCs of the batterystrings and controls the switches to minimize SOC error across thebattery strings and battery modules during operation in some powermodes. This ensures that each battery string is charged and dischargedas evenly as possible and maximizes battery life.

The temperature of a battery string or a battery module may deviate,however, from one or more other battery strings of its battery module orfrom one or more of the other battery modules. The present applicationinvolves managing temperatures of the battery strings and batterymodules to minimize differences between temperatures of the batterystrings and battery modules.

Referring now to FIG. 1 , a functional block diagram of an examplepowertrain system 100 is presented for a hybrid vehicle. While theexample of a hybrid vehicle is provided, the present application isapplicable to non-vehicle applications and other types of vehicles(e.g., electric, internal combustion engine, etc.). The powertrainsystem 100 of a vehicle includes an engine 102 that combusts an air/fuelmixture to produce torque. The vehicle may be non-autonomous orautonomous.

Air is drawn into the engine 102 through an intake system 108. Theintake system 108 may include an intake manifold 110 and a throttlevalve 112. For example only, the throttle valve 112 may include abutterfly valve having a rotatable blade. An engine control module (ECM)114 controls a throttle actuator module 116, and the throttle actuatormodule 116 regulates opening of the throttle valve 112 to controlairflow into the intake manifold 110.

Air from the intake manifold 110 is drawn into cylinders of the engine102. While the engine 102 includes multiple cylinders, for illustrationpurposes a single representative cylinder 118 is shown. For exampleonly, the engine 102 may include 2, 3, 4, 5, 6, 8, 10, and/or 12cylinders. The ECM 114 may instruct a cylinder actuator module 120 toselectively deactivate some of the cylinders under some circumstances,which may improve fuel efficiency.

The engine 102 may operate using a four-stroke cycle or another suitableengine cycle. The four strokes of a four-stroke cycle, described below,will be referred to as the intake stroke, the compression stroke, thecombustion stroke, and the exhaust stroke. During each revolution of acrankshaft (not shown), two of the four strokes occur within thecylinder 118. Therefore, two crankshaft revolutions are necessary forthe cylinder 118 to experience all four of the strokes. For four-strokeengines, one engine cycle may correspond to two crankshaft revolutions.

When the cylinder 118 is activated, air from the intake manifold 110 isdrawn into the cylinder 118 through an intake valve 122 during theintake stroke. The ECM 114 controls a fuel actuator module 124, whichregulates fuel injection to achieve a desired air/fuel ratio. Fuel maybe injected into the intake manifold 110 at a central location or atmultiple locations, such as near the intake valve 122 of each of thecylinders. In various implementations (not shown), fuel may be injecteddirectly into the cylinders or into mixing chambers/ports associatedwith the cylinders. The fuel actuator module 124 may halt injection offuel to cylinders that are deactivated.

The injected fuel mixes with air and creates an air/fuel mixture in thecylinder 118. During the compression stroke, a piston (not shown) withinthe cylinder 118 compresses the air/fuel mixture. The engine 102 may bea compression-ignition engine, in which case compression causes ignitionof the air/fuel mixture. Alternatively, the engine 102 may be aspark-ignition engine, in which case a spark actuator module 126energizes a spark plug 128 in the cylinder 118 based on a signal fromthe ECM 114, which ignites the air/fuel mixture. Some types of engines,such as homogenous charge compression ignition (HCCI) engines mayperform both compression ignition and spark ignition. The timing of thespark may be specified relative to the time when the piston is at itstopmost position, which will be referred to as top dead center (TDC).

The spark actuator module 126 may be controlled by a timing signalspecifying how far before or after TDC to generate the spark. Becausepiston position is directly related to crankshaft rotation, operation ofthe spark actuator module 126 may be synchronized with the position ofthe crankshaft. The spark actuator module 126 may disable provision ofspark to deactivated cylinders or provide spark to deactivatedcylinders.

During the combustion stroke, the combustion of the air/fuel mixturedrives the piston down, thereby driving the crankshaft. The combustionstroke may be defined as the time between the piston reaching TDC andthe time when the piston returns to a bottom most position, which willbe referred to as bottom dead center (BDC).

During the exhaust stroke, the piston begins moving up from BDC andexpels the byproducts of combustion through an exhaust valve 130. Thebyproducts of combustion are exhausted from the vehicle via an exhaustsystem 134.

The intake valve 122 may be controlled by an intake camshaft 140, whilethe exhaust valve 130 may be controlled by an exhaust camshaft 142. Invarious implementations, multiple intake camshafts (including the intakecamshaft 140) may control multiple intake valves (including the intakevalve 122) for the cylinder 118 and/or may control the intake valves(including the intake valve 122) of multiple banks of cylinders(including the cylinder 118). Similarly, multiple exhaust camshafts(including the exhaust camshaft 142) may control multiple exhaust valvesfor the cylinder 118 and/or may control exhaust valves (including theexhaust valve 130) for multiple banks of cylinders (including thecylinder 118). While camshaft-based valve actuation is shown and hasbeen discussed, camless valve actuators may be implemented. Whileseparate intake and exhaust camshafts are shown, one camshaft havinglobes for both the intake and exhaust valves may be used.

The cylinder actuator module 120 may deactivate the cylinder 118 bydisabling opening of the intake valve 122 and/or the exhaust valve 130.The time when the intake valve 122 is opened may be varied with respectto piston TDC by an intake cam phaser 148. The time when the exhaustvalve 130 is opened may be varied with respect to piston TDC by anexhaust cam phaser 150. A phaser actuator module 158 may control theintake cam phaser 148 and the exhaust cam phaser 150 based on signalsfrom the ECM 114. In various implementations, cam phasing may beomitted. Variable valve lift (not shown) may also be controlled by thephaser actuator module 158. In various other implementations, the intakevalve 122 and/or the exhaust valve 130 may be controlled by actuatorsother than a camshaft, such as electromechanical actuators,electrohydraulic actuators, electromagnetic actuators, etc.

The engine 102 may include zero, one, or more than one boost device thatprovides pressurized air to the intake manifold 110. For example, FIG. 1shows a turbocharger including a turbocharger turbine 160-1 that isdriven by exhaust gases flowing through the exhaust system 134. Asupercharger is another type of boost device.

The turbocharger also includes a turbocharger compressor 160-2 that isdriven by the turbocharger turbine 160-1 and that compresses air leadinginto the throttle valve 112. A wastegate (WG) 162 controls exhaust flowthrough and bypassing the turbocharger turbine 160-1. Wastegates canalso be referred to as (turbocharger) turbine bypass valves. Thewastegate 162 may allow exhaust to bypass the turbocharger turbine 160-1to reduce intake air compression provided by the turbocharger. The ECM114 may control the turbocharger via a wastegate actuator module 164.The wastegate actuator module 164 may modulate the boost of theturbocharger by controlling an opening of the wastegate 162.

A cooler (e.g., a charge air cooler or an intercooler) may dissipatesome of the heat contained in the compressed air charge, which may begenerated as the air is compressed. Although shown separated forpurposes of illustration, the turbocharger turbine 160-1 and theturbocharger compressor 160-2 may be mechanically linked to each other,placing intake air in close proximity to hot exhaust. The compressed aircharge may absorb heat from components of the exhaust system 134.

The engine 102 may include an exhaust gas recirculation (EGR) valve 170,which selectively redirects exhaust gas back to the intake manifold 110.The EGR valve 170 may receive exhaust gas from upstream of theturbocharger turbine 160-1 in the exhaust system 134. The EGR valve 170may be controlled by an EGR actuator module 172.

Crankshaft position may be measured using a crankshaft position sensor180. An engine speed may be determined based on the crankshaft positionmeasured using the crankshaft position sensor 180. A temperature ofengine coolant may be measured using an engine coolant temperature (ECT)sensor 182. The ECT sensor 182 may be located within the engine 102 orat other locations where the coolant is circulated, such as a radiator(not shown).

A pressure within the intake manifold 110 may be measured using amanifold absolute pressure (MAP) sensor 184. In various implementations,engine vacuum, which is the difference between ambient air pressure andthe pressure within the intake manifold 110, may be measured. A massflow rate of air flowing into the intake manifold 110 may be measuredusing a mass air flow (MAF) sensor 186. In various implementations, theMAF sensor 186 may be located in a housing that also includes thethrottle valve 112.

Position of the throttle valve 112 may be measured using one or morethrottle position sensors (TPS) 190. A temperature of air being drawninto the engine 102 may be measured using an intake air temperature(IAT) sensor 192. One or more other sensors 193 may also be implemented.The other sensors 193 include an accelerator pedal position (APP)sensor, a brake pedal position (BPP) sensor, may include a clutch pedalposition (CPP) sensor (e.g., in the case of a manual transmission), andmay include one or more other types of sensors. An APP sensor measures aposition of an accelerator pedal within a passenger cabin of thevehicle. A BPP sensor measures a position of a brake pedal within apassenger cabin of the vehicle. A CPP sensor measures a position of aclutch pedal within the passenger cabin of the vehicle. The othersensors 193 may also include one or more acceleration sensors thatmeasure longitudinal (e.g., fore/aft) acceleration of the vehicle andlatitudinal acceleration of the vehicle. An accelerometer is an exampletype of acceleration sensor, although other types of accelerationsensors may be used. The ECM 114 may use signals from the sensors tomake control decisions for the engine 102.

The ECM 114 may communicate with a transmission control module 194, forexample, to coordinate engine operation with gear shifts in atransmission 195. The ECM 114 may communicate with a hybrid controlmodule 196, for example, to coordinate operation of the engine 102 andan electric motor 198. While the example of one electric motor isprovided, multiple electric motors may be implemented. The electricmotor 198 may be a permanent magnet electric motor or another suitabletype of electric motor that outputs voltage based on backelectromagnetic force (EMF) when free spinning, such as a direct current(DC) electric motor or a synchronous electric motor. In variousimplementations, various functions of the ECM 114, the transmissioncontrol module 194, and the hybrid control module 196 may be integratedinto one or more modules.

Each system that varies an engine parameter may be referred to as anengine actuator. Each engine actuator has an associated actuator value.For example, the throttle actuator module 116 may be referred to as anengine actuator, and the throttle opening area may be referred to as theactuator value. In the example of FIG. 1 , the throttle actuator module116 achieves the throttle opening area by adjusting an angle of theblade of the throttle valve 112.

The spark actuator module 126 may also be referred to as an engineactuator, while the corresponding actuator value may be the amount ofspark advance relative to cylinder TDC. Other engine actuators mayinclude the cylinder actuator module 120, the fuel actuator module 124,the phaser actuator module 158, the wastegate actuator module 164, andthe EGR actuator module 172. For these engine actuators, the actuatorvalues may correspond to a cylinder activation/deactivation sequence,fueling rate, intake and exhaust cam phaser angles, target wastegateopening, and EGR valve opening, respectively.

The ECM 114 may control the actuator values in order to cause the engine102 to output torque based on a torque request. The ECM 114 maydetermine the torque request, for example, based on one or more driverinputs, such as an APP, a BPP, a CPP, and/or one or more other suitabledriver inputs. The ECM 114 may determine the torque request, forexample, using one or more functions or lookup tables that relate thedriver input(s) to torque requests.

Under some circumstances, the hybrid control module 196 controls theelectric motor 198 to output torque, for example, to supplement enginetorque output. The hybrid control module 196 may also control theelectric motor 198 to output torque for vehicle propulsion at times whenthe engine 102 is shut down.

The hybrid control module 196 applies electrical power from a battery208 (FIG. 2 ) to the electric motor 198 to cause the electric motor 198to output positive torque. The battery is discussed further below. Theelectric motor 198 may output torque, for example, to an input shaft ofthe transmission 195, to an output shaft of the transmission 195, or toanother component. A clutch 200 may be implemented to couple theelectric motor 198 to the transmission 195 and to decouple the electricmotor 198 from the transmission 195. One or more gearing devices may beimplemented between an output of the electric motor 198 and an input ofthe transmission 195 to provide one or more predetermined gear ratiosbetween rotation of the electric motor 198 and rotation of the input ofthe transmission 195. In various implementations, the electric motor 198may be omitted. In vehicles, such as electric vehicles and autonomousvehicles, the battery 208 can be used to supply self redundant power tovarious systems, such as automotive safety integrity level (ASIL)systems and advanced driver assistant systems (ADAS), as well as servemultiple output voltages (e.g., 12 and 48 volts)

The ECM 114 starts the engine 102 via a starter motor 202. The ECM 114or another suitable module of the vehicle engages the starter motor 202with the engine 102 for an engine startup event. For example only, theECM 114 may engage the starter motor 202 with the engine 102 when a keyON command is received. A driver may input a key ON command, forexample, via actuating one or more ignition keys, buttons, and/orswitches of the vehicle or of a key fob of the vehicle. The startermotor 202 may engage a flywheel coupled to the crankshaft or one or moreother suitable components that drive rotation of the crankshaft.

The ECM 114 may also start the engine in response to an auto-startcommand during an auto-stop/start event or to an engine start commandfor a sailing event. Auto-stop/start events include shutting down theengine 102 while the vehicle is stopped, the driver has depressed thebrake pedal, and the driver has not input a key OFF command. Anauto-start command may be generated while the engine 102 is shut downfor an auto-stop/start event, for example, when a driver releases thebrake pedal and/or depresses the accelerator pedal.

Sail events may include the ECM 114 shutting down the engine 102 whenthe vehicle is moving (e.g., vehicle speed greater than a predeterminedspeed, such as 50 miles per hour), the driver is not applying pressureto the accelerator pedal, and the driver has not input a key OFFcommand. An engine start command may be generated while the engine 102is shut down for a sail event, for example, when a driver depresses theaccelerator pedal. The driver may input a key OFF command, for example,via actuating the one or more ignition keys, buttons, and/or switches,as discussed above.

A starter motor actuator, such as a solenoid, may actuate the startermotor 202 into engagement with the engine 102. For example only, thestarter motor actuator may engage a starter pinion with a flywheelcoupled to the crankshaft. In various implementations, the starterpinion may be coupled to the starter motor 202 via a driveshaft and aone-way clutch. A starter actuator module 204 controls the starter motoractuator and the starter motor 202 based on signals from a startercontrol module, as discussed further below. In various implementations,the starter motor 202 may be maintained in engagement with the engine102.

In response to a command to start the engine 102 (e.g., an auto-startcommand, an engine start command for an end of a sail event, or when akey ON command is received), the starter actuator module 204 suppliescurrent to the starter motor 202 to start the engine 102. The starteractuator module 204 may also actuate the starter motor actuator toengage the starter motor 202 with the engine 102. The starter actuatormodule 204 may supply current to the starter motor 202 after engagingthe starter motor 202 with the engine 102, for example, to allow forteeth meshing.

The application of current to the starter motor 202 drives rotation ofthe starter motor 202, and the starter motor 202 drives rotation of thecrankshaft (e.g., via the flywheel). The period of the starter motor 202driving the crankshaft to start the engine 102 may be referred to asengine cranking.

The starter motor 202 draws power from the battery 208 to start theengine 102. Once the engine 102 is running after the engine startupevent, the starter motor 202 disengages or is disengaged from the engine102, and current flow to the starter motor 202 may be discontinued. Theengine 102 may be considered running, for example, when an engine speedexceeds a predetermined speed, such as a predetermined idle speed. Forexample only, the predetermined idle speed may be approximately 700revolutions per minute (rpm) or another suitable speed. Engine crankingmay be said to be completed when the engine 102 is running.

A generator 206 converts mechanical energy of the engine 102 intoalternating current (AC) power. For example, the generator 206 may becoupled to the crankshaft (e.g., via gears or a belt) and convertmechanical energy of the engine 102 into AC power by applying a load tothe crankshaft. The generator 206 rectifies the AC power into DC powerand stores the DC power in the battery 208. Alternatively, a rectifierthat is external to the generator 206 may be implemented to convert theAC power into DC power. The generator 206 may be, for example, analternator. In various implementations, such as in the case of a beltalternator starter (BAS), the starter motor 202 and the generator 206may be implemented together. In various implementations, one or moredirect current (DC) to DC converters may be implemented.

FIG. 2 is a functional block diagram of an example battery system of thevehicle. The battery 208 has at least two (positive) output terminalsand a negative terminal to provide at least two direct current (DC)operating voltages. For example only, the battery 208 may have a firstpositive (e.g., 48 Volt (V) nominal) terminal 210, a negative terminal212, and a second positive (e.g., 12 V nominal) terminal 214. While theexample of the battery 208 having a 48 V nominal operating voltage and a12 V nominal operating voltage is provided, the battery 208 may have oneor more other operating voltages.

The battery 208 includes a plurality of battery modules, such as a firstbattery module 224-1, . . . , and an N-th battery module 224-N (“batterymodules 224”), where N is an integer greater than or equal to 2. Invarious implementations, N may be equal to 2, 3, 4, 5, 6, 8, 10, 12, oranother suitable number.

As discussed further below with respect to FIG. 4 , each of the batterymodules 224 includes multiple battery strings. Each battery string maybe individually replaceable. The ability to individually replace thebattery strings may enable the battery 208 to include a shorter warrantyperiod and have a lower warranty cost. The battery strings are alsoindividually isolatable, for example, in the event of a fault in abattery string. In various implementations, the battery 208 may have theform factor of a standard automotive grade 12 V battery.

The battery 208 includes a plurality of switches, such as first switches232-1, . . . , N-th switches 232-N (collectively “switches 232”). Theswitches 232 enable the battery strings of the battery modules 224 to beconnected in series, parallel, or combinations of series and parallel toprovide target output voltages and capacities at the output terminals.

A switch control module 240 controls the switches 232 to provide desiredoutput voltages and capacities at the output terminals. The switchcontrol module 240 controls the switches 232 using model predictivecontrol (MPC) or another type of balancing control to as closely aspossible balance the state of charges (SOCs) of the battery strings, asdiscussed further below. The switch control module 240 also controls theswitches 232 based on balancing temperatures of the battery strings ofeach battery module and temperatures of the battery modules.

FIGS. 3A-3B are a schematic including an example battery systemincluding the battery 208. Sets of the battery strings are connectablein series (via ones of the switches 232) to the first positive terminal210 and the negative terminal 212 to provide a first nominal outputvoltage (e.g., 48 V) via the first positive terminal 210. Individualones of the battery strings can be connected (via ones of the switches232) to the second positive terminal 214 and the negative terminal 212to provide a second nominal output voltage (e.g., 12 V) via the secondpositive terminal 214. How many of the battery strings are connected tothe first positive terminal 210 and the second positive terminal 214dictates the portions of the overall capacity of the battery 208available at each of the positive terminals.

As shown in FIG. 3B, a first set of vehicle electrical componentsoperates using one of the two or more operating voltages of the battery208. For example, the first set of vehicle electrical components may beconnected to the second positive terminal 214. The first set of vehicleelectrical components may include, for example but not limited to, theECM 114 and other control modules of the vehicle, the starter motor 202,and/or other electrical loads, such as first 12 V loads 304, second 12 Vloads 308, other control modules 312, third 12 V loads 316, and fourth12 V loads 320. In various implementations, a switching device 324 maybe implemented.

As shown in FIG. 3A, a second set of vehicle electrical componentsoperates using another one of the two or more operating voltages of thebattery 208. For example, the second set of vehicle electricalcomponents may be connected to the first positive terminal 210. Thesecond set of vehicle electrical components may include, for example butnot limited to, the generator 206 and various electrical loads, such as48 V loads 328. The generator 206 may be controlled to charge thebattery 208.

Each of the switches 232 may be an insulated gate bipolar transistor(IGBT), a field effect transistor (FET), such as a metal oxidesemiconductor FET (MOSFET), or another suitable type of switch.

FIG. 4 is a functional block diagram of an example implementation of oneof the battery modules 224, numbered battery module 404, and one set ofthe switches 232. Each of the battery modules 224 may be identical to404, and each set of the switches 232 may be connected identically tothat of 404.

The battery module 404 includes three battery strings, 408, 412, and416. The battery strings 408-416 are identical and each include fourbattery cells 420, 424, 428, and 432. The battery cells 420-432 areconnected in series to provide the second operating voltage (e.g., 12V). Each of the battery cells 420-432 may be, for example, a 3 V batterycell or have another suitable voltage to provide the second operatingvoltage when the battery cells 420-432 are connected in series. Thebattery cells 420-432 may be, for example lithium ferrophosphate (LFP)battery cells or have another suitable chemistry.

Negative terminals of the battery strings 408-416 are connected to thenegative terminal 212. The negative terminals of the battery strings 408and 412 are connected to the negative terminal 212 via switches 436 and440, respectively, when the switches 436 and 440 are closed. Theswitches 436 and 440 can open to disconnect the negative terminals ofthe battery strings 408 and 412 from the negative terminal 212. Thenegative terminal of the battery string 416 may be directly connected tothe negative terminal 212.

The positive terminal of the battery string 416 is connected to thenegative terminal of the battery string 412 such that the batterystrings 412 and 416 are connected in series when switch 444 is closed.The switch 444 can be opened to disconnect the positive terminal of thebattery string 416 from the negative terminal of the battery string 412.The positive terminal of the battery string 412 is connected to thenegative terminal of the battery string 408 such that the batterystrings 412 and 408 are connected in series when switch 448 is closed.The switch 448 can be opened to disconnect the positive terminal of thebattery string 412 from the negative terminal of the battery string 408.

Switches 452, 456, and 460 respectively connect and disconnect thepositive terminals of the battery strings 408, 412, and 416 to and froma first bus (e.g., 12 V bus) that is connected to the second positiveterminal 214. Switch 464 connects and disconnects the positive terminalof the battery string 408 to and from a second bus (e.g., a 48 V bus)that is connected to the first positive terminal 210.

The switch control module 240 controls switching of the switches of eachof the battery modules 224 (the set of switches). At any given time, theswitch control module 240 may actuate the switches associated with abattery module such that the battery module is in an open (X)configuration, a series (S) configuration, or a parallel (P)configuration. FIG. 4 includes an example illustration of the batterymodule 404 in the open (X) configuration. When a battery module is inthe open (X) configuration, all the battery strings of the batterymodule are disconnected from both the first positive terminal 210 andthe second positive terminal 214.

FIG. 5 includes an example illustration of the battery module 404 in theseries (S) configuration. When a battery module is in the series (S)configuration, all of the battery strings of the battery module areconnected in series and to the first positive terminal 210. This isaccomplished by closing switches 444, 448, and 464, and opening all ofthe other switches 436, 440, 452, 456, 460. None of the battery stringsis connected to the second positive terminal 214 when the battery moduleis in the series (S) configuration.

FIG. 6 includes an example illustration of the battery module 404 in theparallel (P) configuration. When a battery module is in the parallel (P)configuration, all the battery strings of the battery module areconnected in parallel to the second positive terminal 214. This isaccomplished by closing switches 452, 456, 460, 436, and 440, andopening all of the other switches 444, 448, and 464. None of the batterystrings is connected to the first positive terminal 210 when the batterymodule is in the parallel (P) configuration.

As illustrated in FIG. 2 , each of the battery modules 224 also includesa plurality of temperature sensors, such as temperature sensors 250-1, .. . , 250-N. For example, one battery temperature sensor may be providedfor each battery string and measure a temperature of that batterystring.

FIG. 7 is a functional block diagram of an example implementation of theswitch control module 240. A switching module 704 applies signals to(e.g., gate terminals) of the switches 232 (the sets of switches) of thebattery modules 224 to control actuation of the switches 232 and tocontrol whether each of the battery modules 224 is in the open (X)state, the series (S) state, or the parallel (P) state.

The switching module 704 applies the signals based on input from a modelpredictive control (MPC) module 708. While the example of the MPC module708 is provided, another type of balancing control module may be used.The MPC module 708 determines a predicted power mode over a predictionhorizon (e.g., the next 9 seconds or another suitable period), anactual/target present power mode, phase durations, and string and moduleconnection and disconnection times based on one or more operatingparameters and generates the output for the switching module 704. TheMPC module 708 generates the output further based on constraints 712 setby a constraint module 716. Examples of the constraints 712 include, forexample, a battery string cannot be connected to either the first orsecond positive terminal 210 and 214 when its battery module is in the Xconnection. A battery string cannot be connected to both the first andsecond positive terminals 210 and 214 at the same time. A battery stringcannot be connected multiple times to the second positive terminal 214when that battery module is to be connected in the parallel (P) mode.Phase durations may be constrained to meet the demand at the firstpositive terminal 210. The duration of connection of each string may notbe limited (constrained) to the end of the phase. The number of channels(battery strings) per battery module may be constrained to meet a demandat the second positive terminal 210. The MPC module 708 may thereforebetter and more quickly balance the SOCs of the battery strings and thebattery modules.

One, more than one, or all of the constraints 712 may be fixed. Invarious implementations, one or more of the constraints 712 may bevariable. The constraints module 716 may set variable constraints basedon one or more operating parameters 714. Examples of the operatingparameters 714 include, for example, the present power mode, thepredicted power mode, a predicted duration of the present power mode,and other example operating parameters.

The MPC module 708 may set the periods of the phases, the periods ofconnections of the modules, and the periods of the strings based on theoperating parameters 714, as stated above. For example, the MPC module708 may set the periods of the phases, the periods of the strings, andthe periods of connections of the modules using lookup tables thatrelate the operating parameters to the periods, respectively.

A state of charge (SOC) module 718 determines a present state of charge(SOC) 720 of each of the battery strings. In other words, the SOC module718 determines present SOCs 720 of the battery strings, respectively.The SOC module 718 may determine the present SOC of a battery string,for example, based on at least one of a voltage across the batterystring and current to and from that battery string. The SOC module 718may determine the present SOC of a battery string using at least one ofan equation and a lookup table that relates voltage and/or current toSOC. In various implementations, the SOC module 718 may determine theSOC of a battery string based on impedance of the battery string, suchas to more precisely relate voltage and current to SOC. The SOC module718 does this for each battery string. Temperatures, voltages, andcurrents of the battery strings 724 may be measured using temperature,voltage, and current sensors, respectively.

The MPC module 708 may control switching of the switches (via theswitching module 704) to minimize an error (e.g., a sum of squarederrors) between the SOCs of the battery strings, respectively, for thepresent power mode. The MPC module 708 may control switching of theswitches further based on present output demands via the first andsecond positive terminals 210 and 214 and predicted output demands fromthe first and second positive terminals 210 and 214. The present andpredicted output demands are illustrated by 728.

To balance the SOCs of the strings 720, using MPC the MPC module 708sets phase durations for each of three phases (phase 1, phase 2, andphase 3), a number of battery strings connected when in the P mode, anda duration that each of the battery strings is connected in the P mode.The durations of the phases may be set to different lengths based onstring and/or module SOC balancing. Each power mode has an associatedset of configurations (X mode, P mode, or S mode) of the battery modules224 for that power mode. A table illustrating power modes and thebattery module modes for each phase is provided below. The MPC module708 cycles through the phases (phase 1, phase 2, phase 3, then back tophase 1, etc.) repeatedly until the power mode is changed.

Power Mode Phase 1 Phase 2 Phase 3 Situation 1(XXX mode) XXX XXX XXX OFF2(XXP mode) XXP PXX XPX 12 V sleep mode 3(XXS mode) XXS SXX XSX 48 V lowpower mode with diagnostic 4(XPP mode) XPP PXP PPX 12 V medium powermode with diagnostic 5(SXP mode) SXP PSX XPS Low power 2 voltage modewith diagnostic 6(XSS mode) XSS SXS SSX 48 V medium power withdiagnostic 7(PPP mode) PPP PPP PPP 12 V high power cranking mode 8(PPSmode) PPS SPP PSP Normal 2 voltage mode 9 (PSS mode) PSS SPS SSP Normal2 voltage mode 10 (SSS mode) SSS SSS SSS 48 V high power mode

In the example table above, the battery module mode of the respectivebattery modules are provided for each phase. For example, when in powermode 5 (SXP mode), during the first phase (phase 1), the first batterymodule is operated in the series (S) mode, the second battery module isoperated in the open (X) mode, and the third battery module is operatedin the parallel (P) mode. Only 1 of the strings of the third batterymodule (being operated in the P mode) can be disconnected before the endof the first phase to better balance the strings of the third batterymodule. During the second phase (phase 2) of power mode 5, the firstbattery module is operated in the parallel (P) mode, the second batterymodule is operated in the series (S) mode, and the third battery moduleis operated in the open (X) mode. Only 1 of the strings of the firstbattery module (being operated in the P mode) can be disconnected beforethe end of the second phase to better balance the strings of the firstbattery module. During the third phase (phase 3) of power mode 5, thefirst battery module is operated in the open (X) mode, the secondbattery module is operated in the parallel (P) mode, and the thirdbattery module is operated in the series (S) mode. Only 1 of the stringsof the second battery module (being operated in the P mode) can bedisconnected before the end of the third phase to better balance thestrings of the second battery module.

The MPC module 708 may set the duration (length) of each of the first,second, and third phases based on balancing of the SOCs of each batterystring and each battery module. For example, in the XXP mode, thebattery strings (e.g., on average) of one battery module have lower SOCsthan the other two battery modules, during charging the MPC module 708may set the phase or phases that the one battery module is operated inthe parallel (P) mode to be longer than the phase or phases that theother two battery modules. This will increase the SOCs of the other twobattery modules less than the SOC of the one of the battery modules suchthat the SOCs are more balanced across the battery modules. Duringdischarging, the battery strings (e.g., on average) of one batterymodule have lower SOCs than the other two battery modules, the MPCmodule 708 may set the phase or phases that the one battery module isoperated in the parallel (P) mode to be shorter than the phase or phasesthat the other two battery modules. This will decrease the SOCs of theother two battery modules more than the SOC of the one of the batterymodules such that the SOCs are more balanced across the battery modules.

The MPC module 708 may set the duration (length/period) of each phasethat each battery string is connected to the second positive terminal214 to balance the individual SOCs of the battery strings of eachmodule. For example, during charging, when one battery string of abattery module has a SOC that is lower than the other battery strings ofthat battery module, the MPC module 708 may set the duration for the oneof the battery strings to be connected to the second positive terminal214 to longer than the durations of the other battery strings of thebattery module. This will increase the SOC of the one battery string ofthe battery module more than the SOCs of the other battery strings ofthe battery module such that the SOCs are more balanced within thebattery module. The MPC module 708 does this for each battery module.During discharging, when one battery string of a battery module has aSOC that is lower than the other battery strings of that battery module,the MPC module 708 may set the duration for the one of the batterystrings to be connected to the second positive terminal 214 to shorterthan the durations of the other battery strings of the battery module.This will decrease the SOC of the one battery string of the batterymodule less than the SOCs of the other battery strings of the batterymodule such that the SOCs are more balanced within the battery module.The MPC module 708 does this for each battery module when operated inthe parallel (P) mode.

As another example, during charging, when one battery string of abattery module has a SOC that is higher than the other battery stringsof that battery module, the MPC module 708 may set the duration for theone of the battery strings to be connected to the second positiveterminal 214 such that the one of the battery strings is disconnectedprior to the end of the phase (i.e., to shorter than the phase) and theother two battery strings to the second positive terminal 214 areconnected for the entirety of the phase (i.e., to the length of thephase). This will increase the SOC of the one battery string of thebattery module to a lesser extent than the SOCs of the other batterystrings of the battery module such that the SOCs are more balancedwithin the battery module. The MPC module 708 does this for each batterymodule. During discharging, when one battery string of a battery modulehas a SOC that is lower than the other battery strings of that batterymodule, the MPC module 708 may set the duration for the one of thebattery strings such that the one of the battery strings is disconnectedprior to the end of the phase (i.e., to shorter than the phase) and theother two battery strings to the second positive terminal 214 areconnected for the entirety of the phase (i.e., to the length of thephase). This will decrease the SOC of the one battery string of thebattery module to a lesser extent than the SOCs of the other batterystrings of the battery module such that the SOCs are more balancedwithin the battery module. The MPC module 708 does this for each batterymodule when operated in the parallel (P) mode.

FIG. 8 includes an example time series for operation in power mode 5(SXP) when the battery 208 is charging through the second positiveterminal 214 while charging or discharging through the first positiveterminal 210, such as with a small current. 804 is the first phase(phase 1), 808 is the second phase (phase 2), and 812 is the third phase(phase 3). As used herein, the MNO mode may mean that the first batterymodule is operating in mode M, the second battery module is operating inmode N, and the third battery module is operating in mode O, where M, N,and O are each one of parallel (P), series (S), or open (X). Forexample, the first phase includes SXP mode where the first batterymodule is operated in the series (S) mode, the second battery module isoperated in the open (X) mode, and the third battery module is operatedin the parallel (P) mode. The second phase includes operation in the PSXmode where the first battery module is operated in the parallel (P)mode, the second battery module is operated in the series (S) mode, andthe third battery module is operated in the open (X) mode. The thirdphase includes operation in the XPS mode where the first battery moduleis operated in the open (X) mode, the second battery module is operatedin the parallel (P) mode, and the third battery module is operated inthe series (S) mode.

In the example of FIG. 8 , the MPC module 708 set the duration of thesecond phase to longer than the duration of the third phase, and theduration of the third phase to shorter than the duration of the firstphase. During charging through the second positive terminal 214 allowsfor more charging of the battery strings of the first battery module(which is connected in the parallel (P) mode in the second phase) thanthe other battery modules and allows for less charging of the batterystrings of the second battery module (which is connected in the parallel(P) mode in the third phase) than the battery strings of the thirdbattery module. The third battery module is operated in the parallel (P)mode in the first phase.

During the first phase 804, the MPC module 708 connected the thirdbattery string 824 of the third battery module to the second positiveterminal 214 for a lesser total duration than the first and secondbattery strings 816 and 820 of the third battery module. This allows thefirst and second battery strings 816 and 820 of the third battery moduleto be charged more than the third battery string 824 of the thirdbattery module to balance the SOCs of the first, second, and thirdbattery strings 816, 820, and 824 of the third battery module.

During the second phase 808, the MPC module 708 connected the firstbattery string 828 of the first battery module to the second positiveterminal 214 for a lesser total duration than the second and thirdbattery strings 832 and 836 of the first battery module. This allows thesecond and third battery strings 832 and 836 of the first battery moduleto be charged more than the first battery string 828 of the firstbattery module to balance the SOCs of the first, second, and thirdbattery strings 828, 832, 836 of the first battery module.

During the third phase 812, the MPC module 708 connected the secondbattery string 844 of the second battery module to the second positiveterminal 214 for a lesser total duration than the first and thirdbattery strings 840 and 848 of the second battery module. This allowsthe first and third battery strings 840 and 848 of the second batterymodule to be charged more than the second battery string 844 of thesecond battery module to balance the SOCs of the first, second, andthird battery strings 840, 844, 848 of the second battery module.

Control then returns to the first phase if the power mode has notchanged. In other words, control continues from phase 1 to phase 2 tophase 3 before repeating phases 1-3 in the same order.

While FIG. 8 is discussed as illustrating charging, similar isapplicable to the situation of discharging. For example, if the SOC ofthe third strings of the first, second, and third battery modules arelower than the SOCs of the first and second strings of the first-thirdbattery modules, respectively, the MPC module 708 may connect the thirdstrings of the first-third battery modules during the respective phasesto the second positive terminal 214 for shorter total periods than thefirst and second strings of the first-third battery modules. Thisdischarges the third strings less than the first and second strings andbalances the SOCs of the battery strings.

FIG. 9 is a flowchart depicting an example method of balancing the SOCsof the battery strings of the battery modules of the battery 208 (e.g.,using MPC control). Control begins with 904 where the SOC module 718determines the SOCs of the battery strings (first, second, and third) ofeach of the battery modules 224 (first, second, and third) of thebattery 208.

At 908, the SOC module 718 may determine SOCs of the battery modules(first, second, and third) based on the battery strings of the batterymodules, respectively. For example, the SOC module 718 may determine anSOC of the first battery module based on an average of the SOCs of thebattery strings (first, second, and third) of the first battery module.The SOC module 718 may determine an SOC of the second battery modulebased on an average of the SOCs of the battery strings (first, second,and third) of the second battery module. The SOC module 718 maydetermine an SOC of the third battery module based on an average of theSOCs of the battery strings (first, second, and third) of the thirdbattery module.

At 912, the MPC module 708 determines the power mode, such as describedabove, based on the operating parameters and the demands. The MPC module708 may select one of the power modes above, such as the SXP mode, theXPP mode, the XXP mode, or another one of the modes above.

At 916, the MPC module 708 determines the phase durations (the periodsof the first, second, and third phases) based on the power mode and theSOCs of the battery modules. For example, for discharging in the XXPmode, the MPC module 708 may set the durations of a phase when a batterymodule is to be connected in the parallel (P) mode to shorter than thedurations of the other phases when the SOC of that battery module isless than the SOC of the other battery modules. The MPC module 708determines the phase durations using MPC, and the phase durations may bedifferent. In other words, the phase durations are not constrained (viathe constraints 712) to be the same.

At 920, the MPC module 708 determines durations for connection of eachstring of each battery module within the phases. As discussed above,only one string of a battery module to be operated in the P mode duringa phase may be disconnected before the end of the phase. For example,during charging in the P mode, the MPC module 708 may charge two batterystrings longer (until the end of a phase) than other battery string(disconnect before the end of the phase) when the battery strings havelower SOCs than the other battery string. During discharging, the MPCmodule 708 may discharge battery strings longer than the other batterystring when the battery strings have higher SOCs than the other batterystring. The MPC module 708 determines the battery string durations usingMPC and, via the constraints 712, can set only one of the batterystrings of a battery module to be disconnected prior to the end of aphase during which that battery module is to be operated in the P mode.

In various implementations 912 and 916 may be performed concurrently bythe MPC module 708. The optimization cost criterion may be zero when allstring SOCs are equal and may become larger with larger differencesbetween the SOCs. One possible formulation of such a cost criterion is aweighted sum of squared differences between the SOCs of neighboringpairs in a cyclic chain that includes all of the strings, this sum takenover a planning horizon consisting of one or more complete cyclesthrough the three phases. Additional penalties may be added such as acost on the total connection times of strings with the purpose ofavoiding overheating any string. The variables in the optimization arethe durations of the phases and the duration that each string isconnected in P configuration. Minimization of the cost criterion issubject to the constraints 712. Violation of a constraint increases thecost of a possibility and thus prevents the possibility from beingselected and used. Given the output demands and predictions 728, thecost criterion can be evaluated by the MPC module 708 for any set ofconnection durations. The solution of the minimization problem is theset of phase durations and string connection durations that most nearlybalance the string SOCs over the planning horizon, subject to theconstraints 712 and taking into account any additional penalty terms.

At 924, the switching module 704 actuates the switches 232 according tothe power mode, the phase durations, and the battery string durations.Control returns to 904 for a next loop.

Charging or discharging of one battery string or battery module forlonger than another battery string of that battery module or otherbattery modules increases the temperature of that battery string orbattery module relative to the other battery strings or battery modules.The temperatures of the battery modules and battery strings maynaturally diverge to meet multiple power demands from the outputterminals that may change quickly.

Referring back to FIG. 7 , the switch control module 240 may alsoinclude a temperature module 740 that receives the temperatures 744 ofthe battery strings, respectively. As discussed above, the temperatures744 of the battery strings may be measured using temperature sensors,respectively. The temperature module 740 determines temperatures 748 ofthe battery modules (module temperatures), respectively. The temperaturemodule 740 determines the temperature 748 of a battery module based onthe temperatures 744 of the battery strings of that battery module. Forexample, the temperature module 740 may set the temperature 748 of abattery module based on or equal to an average of the temperatures 744of the battery strings of that battery module. The temperature module740 may determine the temperature 748 of a battery module using one ormore equations and/or lookup tables that relate battery stringtemperatures to battery module temperature. The temperature module 740determines the temperature 748 of each battery module.

The switching module 704 may control switching of the switches 232further based on the temperatures 744 of the battery strings,respectively, and/or the temperatures 748 of the battery modules,respectively. In various implementations, the MPC module 708 may adjustthe mode based on the temperatures 744 of the battery strings,respectively, and/or the temperatures 748 of the battery modules,respectively. Generally stated, the switching module 704 may controlswitching of the switches 232 based on balancing the temperatures 744 ofthe battery strings, respectively, of a battery module to balance thetemperatures of the battery strings of that battery module. Theswitching module 704 may do this for each battery module. The switchingmodule 704 may also control switching of the switches 232 based onbalancing the temperatures 748 of the battery modules, respectively, tobalance the temperatures of the battery modules. The MPC module 708 maycontrol switching of the switches (via the switching module 704) tominimize an error (e.g., a sum of squared errors) between thetemperatures of the battery strings, respectively, for the present powermode. The MPC module 708 may also control switching of the switches (viathe switching module 704) to minimize an error (e.g., a sum of squarederrors) between the temperatures of the battery modules, respectively,for the present power mode.

Current flow to or from a battery string or battery module is the sourceof heating the battery string or battery module. The MPC module 708 mayset the power mode based on heating one or more battery strings orbattery modules more or less quickly to balance the temperatures of thebattery strings or the battery modules.

FIG. 10 includes an example table of potential power modes, such as foruse when the temperatures of the battery modules are balanced (e.g.,within a predetermined range of each other). 1004 (moving left to right)indicates increasing 48 V power demand. 1008 (moving downward) indicatesincreasing 12 V power demand. Instead of operating in the SXX mode, theMPC module 708 may set the power mode to the SSX mode or the SSS mode todecrease the current flow to or from each of the battery modules anddecrease temperature increases in the battery modules to balance thetemperatures of the battery modules. Instead of operating in the SPXmode, the MPC module 708 may set the power mode to the SPP mode or theSSP mode to decrease the current flow to or from each of the batterymodules and decrease temperature increases in the battery modules tobalance the temperatures of the battery modules. Instead of operating inthe PXX mode, the MPC module 708 may set the power mode to the PPX modeor the PPP mode to decrease the current flow to or from each of thebattery modules and decrease temperature increases in the batterymodules to balance the temperatures of the battery modules. Instead ofoperating in the PPX mode, the MPC module 708 may set the power mode tothe PPP mode to decrease the current flow to or from each of the batterymodules and decrease temperature increases in the battery modules tobalance the temperatures of the battery modules. The MPC module 708 setsthe power mode, however, to achieve the 12 V and 48 V power demands. Assuch, changing to one or more power modes may not be possible whileachieving the power demands.

If the battery strings of a battery module are not balanced (e.g., notwithin the predetermined range of each other), the switching module 704may control the switches of the battery module based on SOC balancingand to balance the temperatures of the battery strings. For example, theswitching module 704 may control the switches of the battery module suchthat a battery string with a higher SOC than the other battery stringsis connected for a shorter period than the other battery strings whencharging and operation in the P mode. As another example, the switchingmodule 704 may control the switches of the battery module such that abattery string with a higher temperature than the other battery stringsis connected for a shorter period than the other battery strings duringoperation in the P mode.

In various implementations, the switching module 704 may use phasesharing where the connection of a battery module a terminal (in Pconnection or S connection) can extend past the end of a phase. This mayallow for increased temperature balancing.

FIG. 11 is an example graph of operation over time. In the example ofFIG. 11 , the power mode XXP could be used to achieve the 12 V powerdemands. The MPC module 708 may set a minimum and maximum number ofbattery strings that can be operated in the P mode at any given time,such as based on the power demands. In the example of FIG. 11 , the MPCmodule 708 set the minimum number of battery strings per battery modulethat can be operated in the P mode to 2. For operation in the XXP mode,XXP mode is used during the first phase, PXX mode is used during thesecond phase, and XPX mode is used during the third phase.

1116 illustrates the first phase, 1120 illustrates the second phase, and1124 illustrates the third phase. For operation in the PXX mode, XPXmode could be used during the first phase, XXP mode could be used duringthe second phase, and PXX mode could be used during the third phase. Asshown, however, the switching module 704 operates the first, second, andthird battery modules in the PPP mode in all of the first, second, andthird phases based on balancing the temperatures 748 of the batterymodules. During the first phase, the switching module 704 stopsoperating the first battery module in the P configuration before thefirst phase ends but operates the second and third battery modules inthe P configuration until the end of the first phase. This increases thetemperature of the first battery module less than the temperatures ofthe second and third battery modules to balance the temperatures of thefirst, second, and third battery modules. During the second phase, theswitching module 704 stops operating the third battery module in the Pconfiguration before the second phase ends but operates the first andsecond battery modules in the P configuration until the end of the firstphase. This increases the temperature of the third battery module lessthan the temperatures of the first and second battery modules to balancethe temperatures of the first, second, and third battery modules. Duringthe third phase, the switching module 704 stops operating the secondbattery module in the P configuration before the third phase ends butoperates the first and third battery modules in the P configurationuntil the end of the third phase. This increases the temperature of thesecond battery module less than the temperatures of the second and thirdbattery modules to balance the temperatures of the first, second, andthird battery modules.

FIG. 12 is an example graph of operation over time. In the example ofFIG. 12 , the power mode PXX could be used to achieve the 12 V powerdemands. To balance temperature, however, the switching module 704operates in the PPP mode. The MPC module 708 may set a minimum andmaximum number of battery strings that can be operated in the P mode atany given time, such as based on the power demands. In the example ofFIG. 12 in the top graph, the MPC module 708 set the maximum number ofbattery strings of each battery module that can be operated in the Pmode to 1.

1104 illustrates durations of any one string of the first battery moduleto achieve the 12V power demand in the P mode, 1108 illustratesdurations of any one string of the second battery module in the P mode,and 1112 illustrates durations of any one string of the third batterymodule in the P mode. 1116 illustrates the first phase, 1120 illustratesthe second phase, and 1124 illustrates the third phase. For operation inthe XXP mode, XXP mode could be used during the first phase, PXX modecould be used during the second phase, and XPX mode could be used duringthe third phase. As shown, however, the switching module 704 operatesthe first, second, and third battery modules in the PPP mode in all ofthe first, second, and third phases based on balancing the temperatures748 of the battery modules. During the first phase, the switching module704 stops operating the first battery module in the P configurationbefore the first phase ends but operates the second and third batterymodules in the P configuration until the end of the first phase. Thisincreases the temperature of the first battery module less than thetemperatures of the second and third battery modules to balance thetemperatures of the first, second, and third battery modules. Thetemperatures of strings of the first battery module are balanced byadjusting the fraction of the total duration that each string isconnected to achieve 12V power demand as each temperature isproportional to the fraction. During the second phase, the switchingmodule 704 stops operating the third battery module in the Pconfiguration before the second phase ends but operates the first andsecond battery modules in the P configuration until the end of thesecond phase. This increases the temperature of the third battery moduleless than the temperatures of the first and second battery modules tobalance the temperatures of the first, second, and third batterymodules. The temperatures of strings of the third battery module arebalanced by adjusting the fraction of the total duration that eachstring is connected to achieve 12V power demand as each temperature isproportional to the fraction. During the third phase, the switchingmodule 704 stops operating the second battery module in the Pconfiguration before the third phase ends but operates the first andthird battery modules in the P configuration until the end of the thirdphase. This increases the temperature of the second battery module lessthan the temperatures of the first and third battery modules to balancethe temperatures of the first, second, and third battery modules. Thetemperatures of strings of the second battery module are balanced byadjusting the fraction of the total duration that each string isconnected to achieve 12V power demand as each temperature isproportional to the fraction.

In the middle graph, the MPC module 708 set the maximum number ofbattery strings of each battery module that can be operated in the Pmode to 2. In the middle graph, 1104-1 and 1104-2 illustrate durationsof any two strings of the first battery module to achieve the 12V powerdemand in the P mode. 1108-1 and 1108-2 illustrate durations of any twostrings of the second battery module to achieve the 12V power demand inthe P mode. 1112-1 and 1112-2 illustrate durations of any two strings ofthe third battery module to achieve the 12V power demand in the P mode.

1116 illustrates the first phase, 1120 illustrates the second phase, and1124 illustrates the third phase. For operation in the XXP mode, XXPmode could be used during the first phase, PXX mode could be used duringthe second phase, and XPX mode could be used during the third phase. Asshown, however, the switching module 704 operates the first, second, andthird battery modules in the PPP mode in all of the first, second, andthird phases based on balancing the temperatures 748 of the batterymodules and the temperatures 740 of the battery strings. During thefirst phase, the switching module 704 stops operating the one of thebattery strings of the first battery module in the P configurationbefore the first phase ends but operates the other battery strings ofthe first battery module and the second and third battery modules in theP configuration until the end of the first phase. This decreases thetotal duration of strings of the first battery module used to achievethe 12 V power demands, which increases the temperature of the firstbattery module less than the temperatures of the second and thirdbattery modules to balance the temperatures of the first, second, andthird battery modules. The temperatures of strings of the first batterymodule are balanced by adjusting the fraction of the total duration thateach string is connected to achieve 12V power demand as each temperatureis proportional to the fraction.

During the second phase, the switching module 704 stops operating one ofthe battery strings of the third battery module in the P configurationbefore the second phase ends but operates the other battery strings ofthe third battery module and the first and second battery modules in theP configuration until the end of the first phase. This decreases thetotal duration of strings of the third battery module used to achievethe 12 V power demand, which increases the temperature of the thirdbattery module less than the temperatures of the first and secondbattery modules to balance the temperatures of the first, second, andthird battery modules. The temperatures of strings of the third batterymodule are balanced by adjusting the fraction of the total duration thateach string is connected to achieve 12V power demand as each temperatureis proportional to the fraction.

During the third phase, the switching module 704 stops operating one ofthe battery strings of the second battery module in the P configurationbefore the third phase ends but operates the other battery strings ofthe second battery module and the first and third battery modules in theP configuration until the end of the third phase. This decreases thetotal duration of the strings of the second battery module used toachieve the 12 V power demand, which increases the temperature of thesecond battery module less than the temperatures of the second and thirdbattery modules to balance the temperatures of the first, second, andthird battery modules. The temperatures of strings of the second batterymodule are balanced by adjusting the fraction of the total duration thateach string is connected to achieve 12V power demand as each temperatureis proportional to the fraction.

In the lower graph, the MPC module 708 set the maximum number of batterystrings of each battery module that can be operated in the P mode to 3.1104-3 illustrates operation of a third battery string of the firstbattery module in the P mode, 1108-3 illustrates operation of a thirdbattery string of the second battery module in the P mode, and 1112-3illustrates operation of a first battery string of the third batterymodule in the P mode.

1116 illustrates the first phase, 1120 illustrates the second phase, and1124 illustrates the third phase. For operation in the XXP mode, XXPmode could be used during the first phase, PXX mode could be used duringthe second phase, and XPX mode could be used during the third phase. Asshown, however, the switching module 704 operates the first, second, andthird battery modules in the PPP mode in all of the first, second, andthird phases based on balancing the temperatures 748 of the batterymodules and the temperatures 744 of the battery strings.

During the first phase, the switching module 704 stops operating thefirst battery string 1104-1 first battery module in the P configurationbefore the first phase ends but operates the second and third batterystrings of the first battery module and the second and third batterymodules in the P configuration until the end of the first phase. Thisincreases the temperature of the first battery string of the firstbattery module less than the temperatures of the second and thirdbattery strings of the first battery module to balance the temperaturesof the battery strings of the first battery module. This also increasesthe temperature of the first battery module less than the temperaturesof the second and third battery modules to balance the temperatures ofthe first, second, and third battery modules.

During the second phase, the switching module 704 stops operating thefirst battery string of the third battery module in the P configurationbefore the second phase ends but operates second and third batterystrings of the third battery module and the first and second batterymodules in the P configuration until the end of the second phase. Thisincreases the temperature of the first battery string of the thirdbattery module less than the temperatures of the second and thirdbattery strings of the third battery module to balance the temperaturesof the battery strings of the third battery module. This also increasesthe temperature of the third battery module less than the temperaturesof the first and second battery modules to balance the temperatures ofthe first, second, and third battery modules.

During the third phase, the switching module 704 stops operating thefirst battery string of the second battery module in the P configurationbefore the third phase ends but operates the second and third batterystrings of the second battery module and the first and third batterymodules in the P configuration until the end of the third phase. Thisincreases the temperature of the first battery string of the secondbattery module less than the temperatures of the second and thirdbattery strings of the second battery module to balance the temperaturesof the battery strings of the second battery module. This also increasesthe temperature of the second battery module less than the temperaturesof the second and third battery modules to balance the temperatures ofthe first, second, and third battery modules.

Generally speaking, the temperature increase of a string is decreases asthe number of strings connected increases and vice versa.

FIG. 13 is an example graph of operation over time. In the example ofFIG. 13 , the SXP power mode could be used to achieve the 12 V and 48 Vpower demands. The MPC module 708 may set a minimum and maximum numberof battery strings that can be operated in the P mode at any given time,such as based on the power demands. In the example of FIG. 13 , the MPCmodule 708 set the maximum number of battery strings of each batterymodule that can be operated in the P mode to 3.

1304 illustrates connection of the first strings of battery modules,1308 illustrates connection the second strings of battery modules, and1312 illustrates connection of the third strings of battery modules. Theconnection of the battery module in the S configuration or the Pconfiguration depends on the phase and the power mode used during thatphase. 1316 illustrates the first phase, 1320 illustrates the secondphase, and 1324 illustrates the third phase.

For operation in the SXP mode, SXP mode could be used during the firstphase, PSX mode could be used during the second phase, and XPS modecould be used during the third phase.

During the first phase, the switching module 704 stops operating thefirst battery module in the S configuration before the first phase endsbut operates the third battery module in the P configuration until theend of the first phase.

During the second phase, the switching module 704 stops operating thesecond battery module in the S configuration before the second phaseends but operates the first battery module in the P configuration untilthe end of the second phase.

During the third phase, the switching module 704 stops operating thethird battery module in the S configuration before the third phase endsbut operates the second battery module in the P configuration until theend of the third phase.

FIG. 14 is an example graph of operation over time. In the example ofFIG. 14 , the power mode PPS could be used to achieve the 12 V and 48 Vpower demands. To balance temperature, however, the switching module 704operates in the PPS mode during the first phase 1416, the SPP modeduring the second phase 1420, and the PSP mode during the third phase1424.

The MPC module 708 may set a minimum and maximum number of batterystrings that can be operated in the P mode at any given time, such asbased on the power demands. In the example of FIG. 14 in the top graph,the MPC module 708 set the maximum number of battery strings of eachbattery module that can be operated in the P mode based on the phase.

During the first phase, the switching module 704 stops operating thethird battery module in the S configuration before the first phase endsbut operates the first and second battery modules in the P configurationuntil the end of the first phase. The MPC module 708 set the maximumnumber of battery strings of the first and second battery module thatcan be operated in the P mode to 1 and 2, respectively. 1406 and 1412during the first phase are the durations of any of two strings of thesecond module to achieve 12V power demand. 1404 during the first phaseis the duration of any of strings of the first module that achieves 12Vpower demand. This may increase the temperature of the second batterymodule less than the temperatures of the first and third battery modulesto balance the temperatures of the first, second, and third batterymodules. The temperatures of strings of the second battery module arebalanced by adjusting the fraction of the total duration that eachstring is connected to achieve 12V power demand as each temperature isproportional to the fraction.

During the second phase, the switching module 704 stops operating thefirst battery module in the S configuration before the second phase endsbut operates the second and third battery modules in the P configurationuntil the end of the second phase. The MPC module 708 set the maximumnumber of battery strings of the second and third battery module thatcan be operated in the P mode to 1 and 2, respectively. 1404 and 1408during the second phase are the durations of any of two strings of thethird module that achieves 12V power demand. 1412 during the secondphase is the duration of any of strings of the second module thatachieves 12V power demand. This may increase the temperature of thethird battery module less than the temperatures of the second and thirdbattery modules to balance the temperatures of the first, second, andthird battery modules. The temperatures of strings of the third batterymodule are balanced by adjusting the fraction of the total duration thateach string is connected to achieve 12V power demand as each temperatureis proportional to the fraction.

During the third phase, the switching module 704 stops operating thesecond battery module in the S configuration before the third phase endsbut operates the first and third battery modules in the P configurationuntil the end of the third phase. The MPC module 708 set the maximumnumber of battery strings of the first and third battery module that canbe operated in the P mode to 2 and 1, respectively. 1404 and 1412 duringthe third phase are the durations of any of two strings of the firstmodule that achieves 12V power demand. 1408 during the third phase isthe duration of any of strings of the third module that achieves 12Vpower demand. This may increase the temperature of the first batterymodule less than the temperatures of the first and second batterymodules to balance the temperatures of the first, second, and thirdbattery modules. The temperatures of strings of the first battery moduleare balanced by adjusting the fraction of the total duration that eachstring is connected to achieve 12V power demand as each temperature isproportional to the fraction.

In the lower graph, the MPC module 708 set the maximum number of batterystrings of each battery module that can be operated in the P mode to 3.

1416 illustrates the first phase, 1420 illustrates the second phase, and1424 illustrates the third phase. During the first phase, 1404-1,1404-2, 1408-1 illustrate operation of a first, second, third batterystring of the first battery module in the P mode, respectively. 1408-2,1412-1, 1412-2 illustrate operation of a first, second, third batterystring of the second battery module in the P mode. During the secondphase, 1404-1, 1404-2, 1408-1 illustrate operation of a first, second,third battery string of the third battery module in the P mode,respectively. 1408-2, 1412-1, 1412-2 illustrate operation of a first,second, third battery string of the second battery module in the P mode.During the third phase, 1404-1, 1404-2, 1408-1 illustrate operation of afirst, second, third battery string of the third battery module in the Pmode, respectively. 1408-2, 1412-1, 1412-2 illustrate operation of afirst, second, third battery string of the first battery module in the Pmode.

During the first phase, the switching module 704 stops operating thefirst battery string 1404-1 first battery module in the P configurationbefore the first phase ends but operates the second and third batterystrings of the first battery module and the second battery module untilthe end of the first phase. This increases the temperature of the firstbattery string of the first battery module less than the temperature ofthe second and third battery string of the first battery module tobalance the temperatures of the battery strings of the first batterymodule. This also increases the temperature of the first battery moduleless than the temperatures of the second and third battery modules tobalance the temperatures of the first, second, and third batterymodules.

During the second phase, the switching module 704 stops operating thefirst battery string of the second battery module in the P configurationbefore the second phase ends but operates second and third batterystring of the second battery module and the third battery modules untilthe end of the first phase. This increases the temperature of the firstbattery string of the second battery module less than the temperature ofthe second and third battery string of the second battery module tobalance the temperatures of the battery strings of the second batterymodule. This also increases the temperature of the second battery moduleless than the temperatures of the first and third battery modules tobalance the temperatures of the first, second, and third batterymodules.

During the third phase, the switching module 704 stops operating thesecond battery string of the third battery module in the P configurationbefore the third phase ends but operates the first and third batterystring of the third battery module and the first battery modules untilthe end of the third phase. This increases the temperature of the secondbattery string of the third battery module less than the temperature ofthe first and third battery string of the third battery module tobalance the temperatures of the battery strings of the third batterymodule. This also increases the temperature of the third battery moduleless than the temperatures of the first and second battery modules tobalance the temperatures of the first, second, and third batterymodules.

FIG. 15 is a flowchart depicting an example method of balancing SOCs andtemperatures of battery strings and modules. Control may begin with 1504where the temperature 740 receives the string temperatures 744 anddetermines the temperatures 748 of the battery modules, respectively.

At 1508, the MPC module 708 determines the power mode based on the 48 Vand 12 V power demands. The MPC module 708 may, for example, determinethe number of S connected battery modules (e.g., to satisfy the 48 Vpower demand) and the number of P connected battery modules (e.g., tosatisfy the 12 V power demand). At 1512, the MPC module 708 (or theswitching module 704) may determine whether a temperature of a batterymodule is outside of a predetermined temperature range around thetemperatures of the other battery modules. Additionally oralternatively, the MPC module 708 (or the switching module 704) maydetermine whether a temperature of a string of a battery module isoutside of a predetermined temperature range around the temperatures ofthe other battery strings of that battery module. If 1512 is false, theswitching module 704 may control switching of the switches of thebattery modules to balance the SOCs of the battery strings and thebattery modules at 1516, such as described above. If 1512 is true,control may continue with 1520.

At 1520, the MPC module 708 (or the switching module 704) may determinewhether an alternate power mode (to the determined power mode) can beused for module and/or string temperature balancing. FIG. 10 includesexample alternate power modes for some power modes that can be used tobalance module and/or string temperature. If 1520 is true, the switchingmodule 704 controls switching using the alternate power mode to balancemodule temperatures and/or string temperatures at 1524. If 1520 isfalse, the switching module 704 may adjust the module connectiondurations and/or string durations to balance the module and/or stringtemperatures and controls switching accordingly at 1528.

The foregoing description is merely illustrative in nature and is in noway intended to limit the disclosure, its application, or uses. Thebroad teachings of the disclosure can be implemented in a variety offorms. Therefore, while this disclosure includes particular examples,the true scope of the disclosure should not be so limited since othermodifications will become apparent upon a study of the drawings, thespecification, and the following claims. It should be understood thatone or more steps within a method may be executed in different order (orconcurrently) without altering the principles of the present disclosure.Further, although each of the embodiments is described above as havingcertain features, any one or more of those features described withrespect to any embodiment of the disclosure can be implemented in and/orcombined with features of any of the other embodiments, even if thatcombination is not explicitly described. In other words, the describedembodiments are not mutually exclusive, and permutations of one or moreembodiments with one another remain within the scope of this disclosure.

Spatial and functional relationships between elements (for example,between modules, circuit elements, semiconductor layers, etc.) aredescribed using various terms, including “connected,” “engaged,”“coupled,” “adjacent,” “next to,” “on top of,” “above,” “below,” and“disposed.” Unless explicitly described as being “direct,” when arelationship between first and second elements is described in the abovedisclosure, that relationship can be a direct relationship where noother intervening elements are present between the first and secondelements, but can also be an indirect relationship where one or moreintervening elements are present (either spatially or functionally)between the first and second elements. As used herein, the phrase atleast one of A, B, and C should be construed to mean a logical (A OR BOR C), using a non-exclusive logical OR, and should not be construed tomean “at least one of A, at least one of B, and at least one of C.”

In the figures, the direction of an arrow, as indicated by thearrowhead, generally demonstrates the flow of information (such as dataor instructions) that is of interest to the illustration. For example,when element A and element B exchange a variety of information butinformation transmitted from element A to element B is relevant to theillustration, the arrow may point from element A to element B. Thisunidirectional arrow does not imply that no other information istransmitted from element B to element A. Further, for information sentfrom element A to element B, element B may send requests for, or receiptacknowledgements of, the information to element A.

In this application, including the definitions below, the term “module”or the term “controller” may be replaced with the term “circuit.” Theterm “module” may refer to, be part of, or include: an ApplicationSpecific Integrated Circuit (ASIC); a digital, analog, or mixedanalog/digital discrete circuit; a digital, analog, or mixedanalog/digital integrated circuit; a combinational logic circuit; afield programmable gate array (FPGA); a processor circuit (shared,dedicated, or group) that executes code; a memory circuit (shared,dedicated, or group) that stores code executed by the processor circuit;other suitable hardware components that provide the describedfunctionality; or a combination of some or all of the above, such as ina system-on-chip.

The module may include one or more interface circuits. In some examples,the interface circuits may include wired or wireless interfaces that areconnected to a local area network (LAN), the Internet, a wide areanetwork (WAN), or combinations thereof. The functionality of any givenmodule of the present disclosure may be distributed among multiplemodules that are connected via interface circuits. For example, multiplemodules may allow load balancing. In a further example, a server (alsoknown as remote, or cloud) module may accomplish some functionality onbehalf of a client module.

The term code, as used above, may include software, firmware, and/ormicrocode, and may refer to programs, routines, functions, classes, datastructures, and/or objects. The term shared processor circuitencompasses a single processor circuit that executes some or all codefrom multiple modules. The term group processor circuit encompasses aprocessor circuit that, in combination with additional processorcircuits, executes some or all code from one or more modules. Referencesto multiple processor circuits encompass multiple processor circuits ondiscrete dies, multiple processor circuits on a single die, multiplecores of a single processor circuit, multiple threads of a singleprocessor circuit, or a combination of the above. The term shared memorycircuit encompasses a single memory circuit that stores some or all codefrom multiple modules. The term group memory circuit encompasses amemory circuit that, in combination with additional memories, storessome or all code from one or more modules.

The term memory circuit is a subset of the term computer-readablemedium. The term computer-readable medium, as used herein, does notencompass transitory electrical or electromagnetic signals propagatingthrough a medium (such as on a carrier wave); the term computer-readablemedium may therefore be considered tangible and non-transitory.Non-limiting examples of a non-transitory, tangible computer-readablemedium are nonvolatile memory circuits (such as a flash memory circuit,an erasable programmable read-only memory circuit, or a mask read-onlymemory circuit), volatile memory circuits (such as a static randomaccess memory circuit or a dynamic random access memory circuit),magnetic storage media (such as an analog or digital magnetic tape or ahard disk drive), and optical storage media (such as a CD, a DVD, or aBlu-ray Disc).

The apparatuses and methods described in this application may bepartially or fully implemented by a special purpose computer created byconfiguring a general purpose computer to execute one or more particularfunctions embodied in computer programs. The functional blocks,flowchart components, and other elements described above serve assoftware specifications, which can be translated into the computerprograms by the routine work of a skilled technician or programmer.

The computer programs include processor-executable instructions that arestored on at least one non-transitory, tangible computer-readablemedium. The computer programs may also include or rely on stored data.The computer programs may encompass a basic input/output system (BIOS)that interacts with hardware of the special purpose computer, devicedrivers that interact with particular devices of the special purposecomputer, one or more operating systems, user applications, backgroundservices, background applications, etc.

The computer programs may include: (i) descriptive text to be parsed,such as HTML (hypertext markup language), XML (extensible markuplanguage), or JSON (JavaScript Object Notation) (ii) assembly code,(iii) object code generated from source code by a compiler, (iv) sourcecode for execution by an interpreter, (v) source code for compilationand execution by a just-in-time compiler, etc. As examples only, sourcecode may be written using syntax from languages including C, C++, C#,Objective-C, Swift, Haskell, Go, SQL, R, Lisp, Java®, Fortran, Perl,Pascal, Curl, OCaml, Javascript®, HTML5 (Hypertext Markup Language 5threvision), Ada, ASP (Active Server Pages), PHP (PHP: HypertextPreprocessor), Scala, Eiffel, Smalltalk, Erlang, Ruby, Flash®, VisualBasic®, Lua, MATLAB, SIMULINK, and Python®.

What is claimed is:
 1. A battery system comprising: a first positiveterminal, a second positive terminal, and a negative terminal; switches;at least two battery modules, wherein each of the at least two batterymodules includes at least three strings of battery cells that areconfigured to, at different times be: connected in series and to thefirst positive terminal via first ones of the switches; connected inparallel and to the second positive terminal via second ones of theswitches; and disconnected from both of the first and second positiveterminals; and a switch control module configured to: receivetemperatures of the strings of battery cells, respectively; determinetemperatures of the battery modules, respectively, based on thetemperatures of the strings of battery cells of that battery module; andselectively actuate the switches based on at least one of: minimizing anerror between the temperatures of the strings of battery cells; andminimizing an error between the temperatures of the battery modules. 2.The battery system of claim 1 wherein the switch control module isconfigured to selectively actuate the switches based on both of:minimizing the error between the temperatures of the strings of batterycells; and minimizing the error between the temperatures of the batterymodules.
 3. The battery system of claim 1 wherein the switch controlmodule is further configured to selectively actuate the switches basedon balancing state of charges (SOCs) of strings of battery cells.
 4. Thebattery system of claim 1 wherein the switch control module isconfigured to, when a first temperature of a first one of the strings ofone of the battery modules is less than a second temperature of a secondone of the strings of the one of the battery modules, selectivelyactuate the switches such that the first one of the strings is connectedto the second positive terminal for a longer period than the second oneof the strings.
 5. The battery system of claim 1 wherein the switchcontrol module is configured to, when a first temperature of a first oneof the strings of one of the battery modules is greater than a secondtemperature of a second one of the strings of the one of the batterymodules, selectively actuate the switches such that the first one of thestrings is connected to the second positive terminal for a shorterperiod than the second one of the strings.
 6. The battery system ofclaim 1 wherein the switch control module is configured to, when a firsttemperature of a first one of the battery modules is less than a secondtemperature of a second one of battery modules, selectively actuate theswitches such that the strings of the first one of the battery modulesare connected in series and to the first positive terminal for a longerperiod than the strings of the second one of battery modules.
 7. Thebattery system of claim 1 wherein the switch control module isconfigured to, when a first temperature of a first one of the batterymodules is greater than a second temperature of a second one of batterymodules, selectively actuate the switches such that the strings of thefirst one of the battery modules are connected in series and to thefirst positive terminal for a shorter period than the strings of thesecond one of battery modules.
 8. The battery system of claim 1 whereinthe switch control module is configured to actuate the switches based onminimizing the error between the temperatures of the strings of batterycells.
 9. The battery system of claim 8 wherein the error is a squarederror between the temperatures of the strings of battery cells.
 10. Thebattery system of claim 1 wherein the switch control module isconfigured to actuate the switches based on minimizing the error betweenthe temperatures of the battery modules.
 11. The battery system of claim10 wherein the error is a squared error between the temperatures of thebattery modules.
 12. The battery system of claim 1 wherein the switchcontrol module is configured to actuate the switches based on at leastone of (a) a first power demand via the first positive terminal and (b)a second power demand via the second positive terminal.
 13. The batterysystem of claim 1 wherein each of the strings of battery cells includesmultiple battery cells connected in series.
 14. The battery system ofclaim 12 wherein the battery cells include four three volt batterycells.
 15. The battery system of claim 1 wherein the switch controlmodule is configured to control the switches such that one of thestrings of battery cells is not at the same time connected to both thefirst positive terminal and the second positive terminal.
 16. Thebattery system of claim 1 wherein: the first positive terminal isconfigured to output a first reference potential; the second positiveterminal is configured to output a second reference potential; and thefirst reference potential is greater than the second referencepotential.
 17. The battery system of claim 16 wherein the firstreference potential is 48 volts direct current (DC) and the secondreference potential is 12 volts DC.
 18. A method for a battery, themethod comprising: receiving temperatures of strings of battery cells,respectively, of a battery, the battery including: a first positiveterminal, a second positive terminal, and a negative terminal; switches;at least two battery modules, wherein each of the at least two batterymodules includes at least three strings of battery cells that areconfigured to, at different times be: connected in series and to thefirst positive terminal via first ones of the switches; connected inparallel and to the second positive terminal via second ones of theswitches; and disconnected from both of the first and second positiveterminals; and determining temperatures of the battery modules,respectively, based on the temperatures of the strings of battery cellsof that battery module; and selectively actuating the switches based onat least one of: minimizing an error between the temperatures of thestrings of battery cells; and minimizing an error between thetemperatures of the battery modules.
 19. The method of claim 18 whereinselectively actuating the switches includes selectively actuating theswitches based on both of: minimizing the error between the temperaturesof the strings of battery cells; and minimizing the error between thetemperatures of the battery modules.
 20. The method of claim 18 whereinselectively actuating the switches includes selectively actuating theswitches further based on balancing state of charges (SOCs) of stringsof battery cells.